package com.example.basic01;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 * @Date 2021/8/1
 * @Created by Jonathan
 */
@Slf4j
public class Animal {
    public String name;

    /*public Animal() {
        log.info("no args Animal constructor.");
    }*/

    public Animal(String name) {
        log.info("name:{}", name);
        this.name = name;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                '}';
    }
}

@Slf4j
class Dog extends Animal {
    public Dog(String name) {
        //this.name = name;
        super(name);
        log.info("");
    }


}

@Slf4j
class TestM {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>(1);
        System.out.println(list);
        Dog dog = new Dog("111");
        log.info("dog:{}", dog);
    }
}
